gpNamespace.PrePlayerTilesLayer = gpNamespace.ParentTilesLayer.extend({
//    fromPoint: cc.p(180, 520),
    fromPoint: cc.p(100, cc.winSize.height / 2 + 65),
    tileSpace: 18,

    warnPoint: cc.p(180, 375),
    isWarn:false,

    initPosition: function () {
        this.startPoint = cc.p(308, 570);
        this.startPointAp = cc.p(160, cc.winSize.height-158);
        this.headPoint = cc.p(71, 527);
        this.headArmaturePoint = cc.p(78, 860);
        this.chuPointStart = cc.p(250, 500);
        this.animationPosition = cc.p(380, 500);
        cc.spriteFrameCache.addSpriteFrames(gpNamespace.pdkgamesenceRes.Pdkgamesence_plist);
    },

    drawRobot: function () {
        cc.log("托管");
       
		var tuoguanphoto = new cc.Sprite(gpNamespace.pdkgame.Game_tuogaunzhong);
		tuoguanphoto.attr({
			x: 20,
			y: 535,
			anchorX: 0,
			anchorY: 0
		});
		this.addChild(tuoguanphoto, 5, "tuoguanLayer");
    },

    runChuActionOnline: function (tiles) {
        this._super(tiles);

        this.reloadRemains(tiles.length);

        if (this.player.isShowCards) {
            var myTiles = this.player.handTiles;

            for (var i = 0; i < tiles.length; i++) {
                var tile = tiles[i];
                var index = gpNamespace.CardActions.getTileIndex(tile, myTiles);
                if (index >= 0) {
                    this.player.splice(index, 1);
                }
            }

            this.resetTilesPositionNormal();
        }
    },

    setCurrentChuPosition: function (length) {
        this.currentChuPosition = this.chuPointStart;
    },

    reloadTiles: function (tiles) {
        var addpx = 3 / 2 * this.tileSpace;
        cc.log("++++++++++addpx:" + addpx + ",startPoint:" + this.startPoint.x);
        this.startPoint.x += addpx;

        this.resetTilesPositionNormal();

        this._super(tiles);
    }
});